home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 451 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  967 b 

  1. Path: overload.lbl.gov!news
  2. From: "E. J. Moler" <EJMOLER@LBL.GOV>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Binary IOStreams?
  5. Date: 4 Jan 1996 17:06:26 GMT
  6. Organization: Advanced Light Source:Lawrence Berkeley National Lab
  7. Message-ID: <4ch1ei$63g@overload.lbl.gov>
  8. References: <DKny36.A0@BearRiver.com>
  9. NNTP-Posting-Host: athome.lbl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (Macintosh; I; 68K)
  14. X-URL: news:DKny36.A0@BearRiver.com
  15.  
  16. According to "The Draft Standard C++ Library" by P. J. Plauger,
  17. one can create streams with mode arguments that determine the
  18. characteristics of the stream.  
  19. For example, to open a binary file with filename s, 
  20.     
  21.                                     ifstream fin(s, ios::binary);
  22.  
  23. There are other modes that can be or'd into the second argument that
  24. do things like append to an ofstream, etc.
  25.  
  26. So the functionality that you want is probably already there.
  27.  
  28. Eddie Moler
  29. EJMOLER@LBL.GOV
  30.  
  31.  
  32.